﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Reflection;

public partial class Controls_BUTTONDJLIST : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        Add();
    }
    protected void btnUpdate_Click(object sender, EventArgs e)
    {
        Update();
    }

    protected void btnOut_Click(object sender, EventArgs e)
    {
        Out();
    }
    protected void btnPrint_Click(object sender, EventArgs e)
    {
        Print();
    }
    public void Add()
    {
        //用反射方法动态调用父页面的方法

        System.Web.UI.Page p = this.Page;
        Type pageType = p.GetType();
        MethodInfo mi = pageType.GetMethod("Add");
        mi.Invoke(p, null);
    }
    public void Update()
    {
        //用反射方法动态调用父页面的方法

        System.Web.UI.Page p = this.Page;
        Type pageType = p.GetType();
        MethodInfo mi = pageType.GetMethod("Update");
        mi.Invoke(p, null);
    }
    public void Out()
    {
        //用反射方法动态调用父页面的方法

        System.Web.UI.Page p = this.Page;
        Type pageType = p.GetType();
        MethodInfo mi = pageType.GetMethod("Out");
        mi.Invoke(p, null);
    }
    public void Print()
    {
        //用反射方法动态调用父页面的方法

        System.Web.UI.Page p = this.Page;
        Type pageType = p.GetType();
        MethodInfo mi = pageType.GetMethod("Print");
        mi.Invoke(p, null);
    }
}
